package com.zhuangjie.rider.controller;

import com.zhaungjie.base.conduit.R;
import com.zhuangjie.rider.service.RiderOrderAccountingRecordService;
import com.zhuangjie.security.annotations.OnlySystemCall;
import com.zhuangjie.security.annotations.PublicAPI;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 骑手配送订单入账记录表 前端控制器
 * </p>
 *
 * @author zhuangjie
 * @since 2024-04-02
 */
@RestController
@RequestMapping("/rider-order-accounting-record")
public class RiderOrderAccountingRecordController {
    @Autowired
    private RiderOrderAccountingRecordService riderOrderAccountingRecordService;
    @ApiOperation("创建店铺订单入账记录")
    @PostMapping("/order-accounting/{orderId}")
    @PublicAPI
    @OnlySystemCall
    public R createOrderAccounting(@PathVariable("orderId") Long orderId){
        return R.capture(()->riderOrderAccountingRecordService.createOrderAccounting(orderId));
    }

}
